const token = sessionStorage.getItem("isLogin") ? JSON.parse(sessionStorage.getItem("isLogin")) : {};

if(token.code !== "OK"){
    if(confirm("没有登录不允许打开购物车页面，是否去登录")){
        location.href = "../login.html"
    }else{
        location.href = "../index.html"
    }
}